<template>
    <!-- 待处理事项模块-差错列表 -->
    <div class="fillcontain">

        <el-dialog
                title="差错登记"
                :visible.sync="drawer"
                :direction="direction"
                :width="'70%'"
                :before-close="handleClose"
                center>
            <div class="contain">
                <iframe v-show="drawer" id="show-iframe"  frameborder=0 name="showHere" scrolling=auto :src="src" width="100%"></iframe>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    import {mapGetters} from 'vuex'
    import constant from '@/utils/constant';
    import {getNodeMap, remarkListReq,getCdfsAuthCode} from "@/api/taskCenter/taskCommon";
    import {addRemark, deleteRemark} from "../../api/taskCenter/taskCommon";
    import appName from "../../api/appName";

    export default {
        name: "error-info-list",
        data() {
            return {
                // 查询条件
                direction: 'rtl',
                src:"",
                tableData: [],
                loading: false,
                pickerOptions1: {
                    disabledDate(time) {
                        return time.getTime() > Date.now();
                    }
                }
            }
        },
        created() {
        },
        mounted() {
        },
        props: {
            drawer: {
                type: Boolean,
                default: false
            },
            taskNo: {
                type: String
            },
        },
        methods: {
            handleClose(done) {
                this.$emit('close', this.drawer);
            },
            // 综合查询列表
            getList(taskNo) {
				//通过字典明细表中定义的sdd_code列名称获取第三方平台路径
				const appContextUrl = JSON.parse(sessionStorage.getItem(constant.APP_CONTEXT_URL));
				if (appContextUrl == null) {
				    this.$message.error("请重新登录后重试！");
				    return;
				}
				const citicgis = appContextUrl['CITICGIS'];
                getCdfsAuthCode().then(res => {
                    if (res.resultCode == constant.SUCCESS && res.data) {
                        let href = citicgis + `/mistakeManager?requestType=list&authCode=${res.data.authCode}&loginUserId=${res.data.userId}&taskno=${taskNo}`;
						window.open(href,"_blank")
                    }else {
                        this.$message.error(res.resultMsg);
                    }
                }).catch(error => {
                    this.$message.error("获取CDFS差错登记出错");
                });
            },
        },
        watch: {
            taskNo: function (newValue) {
                if (newValue != undefined && newValue != '')
                    this.getList(newValue);
            }
        },
        computed: {
            ...mapGetters(['tags']),

        },
        activated() {
            if (this.reload) {
                this.$store.dispatch('loading/CHNAGE_RELOAD', false)
                Object.assign(this.$data, this.$options.data());
            }
        }
    }
</script>

<style lang="less" scoped>
    .fillcontain {
        padding-bottom: 0;
    }

    .contain {
        background: #fff;
        padding: 10px;
        margin-bottom: 20px;
    }

    .pagination {
        padding: 10px 20px;
        text-align: right;
    }

    .operationIcon {
        // padding: 12px;
        border: 1px solid #e5e5e5;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        display: inline-block;
        cursor: pointer;
        box-shadow: 0 0 3px #f9f9f9;

        .svg-icon {
            font-size: 14px;
            fill: #68a3fc;
        }
    }

    .search_container {
        padding: 20px 20px 0 20px;
        border-top: 1px solid #e1e1e1;
    }
</style>



